<?php
/**
 * DotHerbert TestSuite
 *
 * @package    unittest
 * @copyright  2009 extreme-programmers
 * @license    http://dotherbert.extreme-programmers.com/license   BSD License
 * @version    $Id:$
 */

namespace dotherbert\unittest;

require_once substr(__FILE__, 0, strrpos(__FILE__, DIRECTORY_SEPARATOR . 'tests') + 7) . 'TestHelper.php';

if (!defined('PHPUnit_MAIN_METHOD')) {
    define('PHPUnit_MAIN_METHOD', TestSuiteLoader::getUnitTestMainMethod(__FILE__));
}

/**
 * @package    unittest
 * @author     Johannes Trink <johannes.trink@extreme-programmers.com>
 */
class AllTests
{
    public static function main()
    {
        TestRunner::run(self::suite());
    }

    public static function suite()
    {
        return TestSuiteLoader::getSuite(__FILE__);
    }
}

if (PHPUnit_MAIN_METHOD == TestSuiteLoader::getUnitTestMainMethod(__FILE__)) {
    TestSuiteLoader::runUnitTestMainMethod(PHPUnit_MAIN_METHOD);
}